package com.wenjie.original.service.impl;

import com.mybatisflex.core.query.QueryWrapper;
import com.wenjie.original.entity.SysCodeTemp;
import com.wenjie.original.flex_config.baseInterface.Cus_ServiceImp;
import com.wenjie.original.mapper.SysCodeTempMapper;
import com.wenjie.original.service.ISysCodeTempService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 代码模版 服务实现类
 * </p>
 *
 * @author author
 * @since 2024-06-25
 */
@Service
public class SysCodeTempServiceImpl extends Cus_ServiceImp<SysCodeTempMapper, SysCodeTemp> implements ISysCodeTempService {
    @Override
    public void removeByGroupId(Long groupId) {
        SysCodeTemp sysCodeTemp = new SysCodeTemp();
        sysCodeTemp.setSysCodeTempGroupId(groupId);
        this.remove(QueryWrapper.create(sysCodeTemp));
    }

    @Override
    public List<SysCodeTemp> listByGroupId(Long groupId) {
        SysCodeTemp sysCodeTemp = new SysCodeTemp();
        sysCodeTemp.setSysCodeTempGroupId(groupId);
        return this.list(QueryWrapper.create(sysCodeTemp));
    }
}
